🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

lazy-arrayify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lazy-arrayify - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+4
-0
CHANGELOG.md
## 1.0.1 - 2016-04-29
- Release v1.0.1 / npm@v1.0.1
- allow accessing methods with `require('lazy-arrayify/isarray')` for example
## 1.0.0 - 2016-04-29

@@ -4,0 +8,0 @@ - Release v1.0.0 / npm@v1.0.0

+15
-11

@@ -0,1 +1,8 @@

/*!
* lazy-utils <https://github.com/tunnckoCore/lazy-utils>
*
* Copyright (c) 2016 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)
* Released under the MIT license.
*/
'use strict'

@@ -55,8 +62,2 @@

/**
* Restore `require`
*/
require = fn // eslint-disable-line no-undef, no-native-reassign
/**
* > Returns empty array on falsey values.

@@ -79,2 +80,3 @@ *

*
* @name .arrayify
* @param {Mixed} `val`

@@ -85,9 +87,11 @@ * @return {Array}

utils.arrayify = function arrayify (val) {
if (!val) return []
if (!utils.isArray(val)) return [val]
return val
}
require('./arrayify', 'arrayify')
/**
* Restore `require`
*/
require = fn // eslint-disable-line no-undef, no-native-reassign
/**
* Expose `utils` modules

@@ -94,0 +98,0 @@ */

{
"name": "lazy-arrayify",
"version": "1.0.0",
"version": "1.0.1",
"description": "We are lazy, also [lazy-cache][]d and [browserify][]-ready - just arrayify, falsey values returns empty array. In bonus with `.isArray` method.",

@@ -15,3 +15,3 @@ "repository": "tunnckoCore/lazy-arrayify",

"isarray": "^1.0.0",
"lazy-cache": "^2.0.0"
"lazy-cache": "^1.0.0"
},

@@ -18,0 +18,0 @@ "devDependencies": {