Skip to content

Commit

Permalink
Merge pull request #3 from opendxl/dependency-update
Browse files Browse the repository at this point in the history
ES6 update, dependency update, minor branding change
  • Loading branch information
raph-trellix authored Aug 19, 2024
2 parents 0e449ee + 5b57ebe commit cb29f1a
Show file tree
Hide file tree
Showing 28 changed files with 255 additions and 253 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"asi": true,
"esversion": 5,
"esversion": 6,
"node": true
}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# McAfee Threat Intelligence Exchange (TIE) DXL JavaScript Client Library
# Trellix Threat Intelligence Exchange (TIE) DXL JavaScript Client Library
[![Latest NPM Version](https://img.shields.io/npm/v/@opendxl/dxl-tie-client.svg)](https://www.npmjs.com/package/@opendxl/dxl-tie-client)
[![Actions Status](https://github.com/opendxl/opendxl-tie-client-javascript/workflows/Build/badge.svg)](https://github.com/opendxl/opendxl-tie-client-javascript/actions)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
Expand All @@ -7,9 +7,9 @@
## Overview

The
[McAfee Threat Intelligence Exchange](http://www.mcafee.com/us/products/threat-intelligence-exchange.aspx)
[Trellix Threat Intelligence Exchange](https://www.trellix.com/products/threat-intelligence-exchange/)
(TIE) DXL JavaScript client library provides a high level wrapper for the TIE
[Data Exchange Layer](http://www.mcafee.com/us/solutions/data-exchange-layer.aspx)
[Data Exchange Layer](https://www.trellix.com/assets/docs/data-sheets/trellix-dataexchangelayer-datasheet.pdf)
(DXL) API.

The purpose of this library is to allow users to access the features of TIE
Expand All @@ -20,16 +20,16 @@ formats.
## Documentation

See the [Wiki](https://github.com/opendxl/opendxl-tie-client-javascript/wiki)
for an overview of the McAfee Threat Intelligence (TIE) DXL JavaScript client
for an overview of the Trellix Threat Intelligence (TIE) DXL JavaScript client
library and examples.

See the
[McAfee Threat Intelligence (TIE) DXL JavaScript Client Library Documentation](https://opendxl.github.io/opendxl-tie-client-javascript/jsdoc)
[Trellix Threat Intelligence (TIE) DXL JavaScript Client Library Documentation](https://opendxl.github.io/opendxl-tie-client-javascript/jsdoc)
for installation instructions, API documentation, and examples.

## Installation

To start using the McAfee Threat Intelligence (TIE) DXL JavaScript Client
To start using the Trellix Threat Intelligence (TIE) DXL JavaScript Client
Library:

* Download the [Latest Release](https://github.com/opendxl/opendxl-tie-client-javascript/releases/latest)
Expand All @@ -45,7 +45,7 @@ For bugs, questions and discussions please use the

## LICENSE

Copyright 2018 McAfee, LLC
Copyright 2024 Musarubra US LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
Expand Down
4 changes: 2 additions & 2 deletions doc/sdk/advanced-get-reputation-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ examine specific fields within the reputation responses.

### Running

To run this sample execute the `sample/basic/advanced-get-reputation-example.js`
To run this sample execute the `sample/advanced/advanced-get-reputation-example.js`
script as follows:

```sh
$ node sample/basic/advanced-get-reputation-example.js
$ node sample/advanced/advanced-get-reputation-example.js
```

The output should appear similar to the following:
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/cert-enterprise-attrib.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

'use strict'

var EnterpriseAttrib = require('./enterprise-attrib')
const EnterpriseAttrib = require('./enterprise-attrib')

module.exports = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/cert-gti-attrib.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

'use strict'

var GtiAttrib = require('./gti-attrib')
const GtiAttrib = require('./gti-attrib')

module.exports = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/cert-rep-change-event-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict'

var RepChangeEventProp = require('./rep-change-event-prop')
const RepChangeEventProp = require('./rep-change-event-prop')

module.exports = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/cert-reputation-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

'use strict'

var ReputationProp = require('./reputation-prop')
const ReputationProp = require('./reputation-prop')

module.exports = {
/**
Expand Down
6 changes: 3 additions & 3 deletions lib/constants/enterprise-attrib.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

'use strict'

var Long = require('long')
const Long = require('long')

module.exports = {
/**
Expand Down Expand Up @@ -49,8 +49,8 @@ module.exports = {
* encoded version string
*/
toVersionArray: function (versionAttrib) {
var versionAsLong = Long.fromString(versionAttrib)
var versionHighBits = versionAsLong.getHighBitsUnsigned()
const versionAsLong = Long.fromString(versionAttrib)
const versionHighBits = versionAsLong.getHighBitsUnsigned()
return [((versionHighBits >>> 56) & 0xff),
((versionHighBits >>> 48) & 0xff),
((versionHighBits >>> 32) & 0xffff),
Expand Down
4 changes: 2 additions & 2 deletions lib/constants/epoch-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'use strict'

function pad (value) {
var valueAsStr = value.toString()
let valueAsStr = value.toString()
if (valueAsStr.length === 1) {
valueAsStr = '0' + valueAsStr
}
Expand Down Expand Up @@ -41,7 +41,7 @@ module.exports = {
* @returns {String} - Time as a string (in local time)
*/
toLocalTimeString: function (epochTime) {
var localTime = module.exports.toLocalTime(epochTime)
const localTime = module.exports.toLocalTime(epochTime)
return localTime.getFullYear() + '-' +
pad(localTime.getMonth() + 1) + '-' +
pad(localTime.getDate()) + ' ' + pad(localTime.getHours()) + ':' +
Expand Down
10 changes: 5 additions & 5 deletions lib/constants/file-enterprise-attrib.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

'use strict'

var Buffer = require('safe-buffer').Buffer
var EnterpriseAttrib = require('./enterprise-attrib')
const Buffer = require('safe-buffer').Buffer
const EnterpriseAttrib = require('./enterprise-attrib')

module.exports = {
/**
Expand Down Expand Up @@ -198,9 +198,9 @@ module.exports = {
* aggregate string.
*/
toAggregateArray: function (aggregateAttrib) {
var decodedAttrib = Buffer.from(aggregateAttrib, 'base64')
var returnValue = []
for (var i = 0; i < decodedAttrib.length; i += 2) {
const decodedAttrib = Buffer.from(aggregateAttrib, 'base64')
const returnValue = []
for (let i = 0; i < decodedAttrib.length; i += 2) {
returnValue.push((decodedAttrib[i] + (256 * decodedAttrib[i + 1])))
}
if (returnValue[4] > 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/file-gti-attrib.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

'use strict'

var GtiAttrib = require('./gti-attrib')
const GtiAttrib = require('./gti-attrib')

module.exports = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/file-rep-change-event-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict'

var RepChangeEventProp = require('./rep-change-event-prop')
const RepChangeEventProp = require('./rep-change-event-prop')

module.exports = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/file-reputation-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

'use strict'

var ReputationProp = require('./reputation-prop')
const ReputationProp = require('./reputation-prop')

module.exports = {
/**
Expand Down
Loading

0 comments on commit cb29f1a

Please sign in to comment.