Function reference · Assumptions and sets
issubset
Tests whether every value of the first set is in the second.
Notation
issubset(set1, set2)
Write it in an expression: nerdamer('issubset({1},{1,2})'), or in the Playground.
nerdamer.issubset
nerdamer.issubset(...args: [a, b]): ParserEntity
A method on the default import. Arguments can be strings, as in Notation.
import { isSubset }
import { isSubset } from 'nerdamer/structures';
isSubset(set1: ParserEntity, set2: ParserEntity): ParserEntity
Import only this function, from nerdamer/structures.
Parameters
set1- The set whose values are checked.
set2- The set to look for them in.
Returns
1 when set1 is a subset of set2, 0 otherwise.
Examples
If the sets have no value yet, the call is kept as it is.
issubset(A,B)
// → issubset(A, B)Open in PlaygroundGood to know
- Both arguments must be sets.
issubset(A,B)is the same as the comparisonA <= B.
JavaScript examples
nerdamer.issubset('{1}', '{1,2}').text()
// → 1Deprecated names
Deprecated.
is_subset still works, and gives the same result as issubset, but each call records an api.deprecatedFunction warning. Use issubset instead; the old name will be removed in a later major version.
