JSPM

@silen/is-set

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q52370F
  • License MIT

Check if the parameter is set

Package Exports

  • @silen/is-set

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@silen/is-set) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-set

Determine if a value is Set

install

npm i @silen/is-set

api

  • declare function isSet(val: any): boolean;

usage

const { isSet } = require('@silen/is-set');
// or
import { isSet } from '@silen/is-set';

console.log(isSet(new Buffer(4)));
console.log(isSet(Buffer.alloc(4)));
console.log(isSet(undefined));
console.log(isSet(null));
console.log(isSet(''));
console.log(isSet(true));
console.log(isSet(0));
console.log(isSet(1));
console.log(isSet(1.0));
console.log(isSet('string'));
console.log(isSet({}));
console.log(isSet(function foo() {}));
console.log(isSet(Symbol()));
console.log(isSet(new Set));
console.log(isSet(new Map));
console.log(isSet(new WeakMap));
console.log(isSet(new WeakSet));

// or
console.log(window.Type.isSet(new WeakSet));

This is a demo for testing the usage of isSet from @silen/is-set module. You can try the others and do likewise.

others