empty

WebJar for empty

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

empty
Последняя версия

Последняя версия

0.10.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

empty
WebJar for empty
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/iclanzan/empty

Скачать empty

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/empty/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>empty</artifactId>
    <version>0.10.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/empty/
implementation 'org.webjars.npm:empty:0.10.1'
// https://jarcasting.com/artifacts/org.webjars.npm/empty/
implementation ("org.webjars.npm:empty:0.10.1")
'org.webjars.npm:empty:jar:0.10.1'
<dependency org="org.webjars.npm" name="empty" rev="0.10.1">
  <artifact name="empty" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='empty', version='0.10.1')
)
libraryDependencies += "org.webjars.npm" % "empty" % "0.10.1"
[org.webjars.npm/empty "0.10.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : envify jar [3.4.0,4)

Модули Проекта

Данный проект не имеет модулей.

empty

Utility that provides different types of empty objects. All objects returned by this library are immutable (made so using Object.freeze) unless the NODE_ENV environment variable is set to 'production'.

Installation

The library is written for CommonJS environments such as Node and works beautifully in the browser using something like Browserify.

To install, make sure you have Node installed, then, in your project directory, run:

$ npm install empty

API

var empty = require('empty');

empty.object

var emptyObject = empty.object;

// or

var emptyObject = require('empty/object');

console.log(emptyObject);
// {}

empty.array

var emptyArray = empty.array;

// or

var emptyArray = require('empty/array');

console.log(emptyArray);
// []

empty.func

var emptyFunction = empty.func;

// or

var emptyFunction = require('empty/function');

console.log(emptyFunction);
// function () {}

empty.functionThatReturns

var functionThatReturns = empty.functionThatReturns;

// or

var functionThatReturns = require('empty/functionThatReturns');

console.log(functionThatReturns('foo')());
// 'foo'

empty.functionThatReturnsTrue

var functionThatReturnsTrue = empty.functionThatReturnsTrue;

// or

var functionThatReturnsTrue = require('empty/functionThatReturnsTrue');

console.log(functionThatReturnsTrue());
// true

empty.functionThatReturnsFalse

var functionThatReturnsFalse = empty.functionThatReturnsFalse;

// or

var functionThatReturnsFalse = require('empty/functionThatReturnsFalse');

console.log(functionThatReturnsFalse());
// false

empty.functionThatReturnsNull

var functionThatReturnsNull = empty.functionThatReturnsNull;

// or

var functionThatReturnsNull = require('empty/functionThatReturnsNull');

console.log(functionThatReturnsNull());
// null

empty.functionThatReturnsThis

var functionThatReturnsThis = empty.functionThatReturnsThis;

// or

var functionThatReturnsThis = require('empty/functionThatReturnsThis');

console.log(functionThatReturnsThis.call({a: 1}));
// {a: 1}

empty.functionThatReturnsArgument

var functionThatReturnsArgument = empty.functionThatReturnsArgument;

// or

var functionThatReturnsArgument = require('empty/functionThatReturnsArgument');

console.log(functionThatReturnsArgument('foo'));
// 'foo'

Credits

Many thanks to Arturo for the name on NPM. The original package repository can be found at here.

Версии библиотеки

Версия
0.10.1