Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "addtoset", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Utility array function to add value to array if doesn't exist", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,6 +17,8 @@ © ,Kailash Yogeshwar, Licensed under MIT-License | ||
const addToSet = require('addtoset'); | ||
const set = new addToSet(); | ||
let arr = [1,2,3,4,5]; | ||
addToSet.push(arr, 6); // [1,2,3,4,5,6] | ||
addToSet.push(arr, 1); // [1,2,3,4,5] | ||
arr = set.push(arr, 6); // [1,2,3,4,5,6] | ||
arr = set.push(arr, 1); // [1,2,3,4,5] | ||
@@ -26,5 +28,5 @@ // Error if parameter is not array | ||
addToSet.push(str,1); // Error: Source must be array | ||
set.push(str,1); // Error: Source must be array | ||
``` | ||
Thank you. Happy Coding |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3425
30