Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

a-toolbox

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a-toolbox - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/atoolbox.min.js.map

19

array.js

@@ -7,4 +7,4 @@ /**

/**
* remove an element from array, only once
* @method tools.array.remove
* remove an element from array, only once
* @todo item=object, date, regexp ...

@@ -24,4 +24,6 @@ * @todo remove all item, not only first

},
/**
* remove an element from array at position
* @method tools.array.removeAt
* @param {Array<*>} array

@@ -37,4 +39,6 @@ * @param {number} index

},
/**
* get last element of array or undefined
* @method tools.array.last
* @param {Array<*>} array

@@ -52,4 +56,6 @@ * @return {*} last element of the array or undefined

},
/**
* get nth element of array
* @method tools.array.at
* @param {Array<*>} array

@@ -71,4 +77,6 @@ * @return {*} nth element of array; if negative, start from end: -1 = last element; undefined if missing

},
/**
* get first element of array or undefined
* @method tools.array.first
* @param {Array<*>} array

@@ -86,4 +94,6 @@ * @return {*} first element of the array or undefined

},
/**
* check if array contains an element
* @method tools.array.contains
* @param {Array<*>} array

@@ -96,4 +106,6 @@ * @param {*} item

},
/**
* insert an item into array at index position
* @method tools.array.insert
* @param {Array<*>} array

@@ -121,2 +133,3 @@ * @param {number} index

* concat arrays
* @method tools.array.concat
* @param {...Array<*>} arrays to chain

@@ -130,4 +143,6 @@ * @return {Array<*>} chained arrays

},
/**
* empty array - need to keep references
* @method tools.array.empty
* @test.case [0,1,2] > &[]

@@ -141,4 +156,6 @@ * @test.case [] > &[]

},
/**
* push item into array, optionally check if already exists
* @method tools.array.add
*/

@@ -145,0 +162,0 @@ add: function (array, item, unique) {

@@ -7,2 +7,3 @@ /**

* merge obj2 into obj1
* @method tools.object.merge
* @param {Object} obj1

@@ -39,2 +40,3 @@ * @param {Object} obj2

* Clone an array or an object in input
* @method tools.object.clone
* @param {Object|Array} obj The array or the object to clone

@@ -72,2 +74,3 @@ * @return {Object|Array}

* @see http://google.github.io/closure-library/api/source/closure/goog/object/object.js.src.html#l225
* @method tools.object.getKeys
* @param {Object} obj

@@ -88,2 +91,3 @@ * @return {Array}

/**
* @method tools.object.inherits
* @todo check if both are objects

@@ -99,2 +103,3 @@ */

* empty object - need to keep references
* @method tools.object.empty
* @test.case {a:0,b:1,c:2,d:[],e:{f:-1}} > &{}

@@ -111,2 +116,3 @@ * @test.case {} > &{}

* flat keys in object
* @method tools.object.flat
* @param {Object} obj

@@ -137,4 +143,6 @@ * @return {Object}

},
/**
* restore flat object
* @method tools.object.raise
* @param {Object} obj

@@ -167,4 +175,6 @@ * @return {Object}

},
/**
* get value in object using a flat key
* @method tools.object.getByFlatKey
* @todo check params

@@ -190,2 +200,3 @@ * @param {Object} obj

* set value in object using a flat key
* @method tools.object.setByFlatKey
* @todo check params

@@ -192,0 +203,0 @@ * @param {Object} obj

2

package.json
{
"name": "a-toolbox",
"version": "1.0.0",
"version": "1.0.1",
"description": "javascript lightweight basic tools",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,5 +8,6 @@ /**

* ~ES6 template string without $
* @method tools.string.template
* @param {String} str
* @param {Object} obj
* @param {boolean=} remove missing placeholders from obj, default false
* @param {boolean} [remove=false] missing placeholders from obj, default false
* @return {String}

@@ -33,2 +34,3 @@ *

* @see http://google.github.io/closure-library/api/namespace_goog_string.html
* @method tools.string.trim
* @param {String} str

@@ -53,2 +55,3 @@ * @param {?string[]} cuts

/**
* @method tools.string.replaceAll
* @param {String} str

@@ -69,2 +72,3 @@ * @param {String} from

/**
* @method tools.string.capitalize
* @param {String} str

@@ -81,2 +85,3 @@ * @return {String}

/**
* @method tools.string.prependMissing
* @param {String} prefix

@@ -96,2 +101,3 @@ * @param {String} str

/**
* @method tools.string.matchAll
* @param {String} str

@@ -98,0 +104,0 @@ * @param {RegExp} regexp

@@ -13,3 +13,3 @@

tester.bulk(require('./modules/fs.js'))
tester.bulk(require('./modules/array.js'))
/* tester.bulk(require('./modules/array.js'))
tester.bulk(require('./modules/object.js'))

@@ -22,3 +22,4 @@ tester.bulk(require('./modules/hash.js'))

tester.bulk(require('./modules/time.js'))
*/
tester.run()

@@ -9,3 +9,3 @@ const object = require('./object')

/**
* can be used across modules using same tag
* @namespace tools.time.chrono
*/

@@ -15,3 +15,3 @@ chrono: {

* @method tools.time.chrono.set
* @param {?string} [tag=chrono]
* @param {String} [tag=chrono]
*/

@@ -27,3 +27,3 @@ set: function (tag = 'chrono') {

* @method tools.time.chrono.reset
* @param {?string} [tag=chrono]
* @param {String} [tag=chrono]
*/

@@ -35,3 +35,3 @@ reset: function (tag = 'chrono') {

* @method tools.time.chrono.clear
* @param {?string} [tag=chrono]
* @param {String} [tag=chrono]
*/

@@ -43,3 +43,3 @@ clear: function (tag = 'chrono') {

* @method tools.time.chrono.get
* @param {?string} [tag=chrono]
* @param {String} [tag=chrono]
* @return {number} ms

@@ -46,0 +46,0 @@ */

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc